import usePiXiFrameAni from '@/hooks/usePixiFrameAni';
import { useEffect } from 'react';
import { Toast } from 'react-vant';

const VideoFrameImages = [] as string[];
for (let i = 1; i <= 60; i++) {
  VideoFrameImages.push(`/head/${i}.png?v=1.0.0`);
}
export default function () {
  const { init } = usePiXiFrameAni({
    container: 'videoContainer',
    imagePaths: VideoFrameImages,
  });

  useEffect(() => {
    const t1 = Toast.loading({ duration: 0, message: '资源加载中...' });
    init().then(() => {
      t1.clear();
    });
  });

  return (
    <>
      <div id="videoContainer" className="w-[690px] h-[1200px]"></div>
    </>
  );
}
